Optimal. Leaf size=57 \[ \frac {\log (\cos (c+d x))}{d}+\frac {\tan ^2(c+d x)}{2 d}-\frac {\tan ^4(c+d x)}{4 d}+\frac {\tan ^6(c+d x)}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3554, 3556}
\begin {gather*} \frac {\tan ^6(c+d x)}{6 d}-\frac {\tan ^4(c+d x)}{4 d}+\frac {\tan ^2(c+d x)}{2 d}+\frac {\log (\cos (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3554
Rule 3556
Rubi steps
\begin {align*} \int \tan ^7(c+d x) \, dx &=\frac {\tan ^6(c+d x)}{6 d}-\int \tan ^5(c+d x) \, dx\\ &=-\frac {\tan ^4(c+d x)}{4 d}+\frac {\tan ^6(c+d x)}{6 d}+\int \tan ^3(c+d x) \, dx\\ &=\frac {\tan ^2(c+d x)}{2 d}-\frac {\tan ^4(c+d x)}{4 d}+\frac {\tan ^6(c+d x)}{6 d}-\int \tan (c+d x) \, dx\\ &=\frac {\log (\cos (c+d x))}{d}+\frac {\tan ^2(c+d x)}{2 d}-\frac {\tan ^4(c+d x)}{4 d}+\frac {\tan ^6(c+d x)}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.11, size = 47, normalized size = 0.82 \begin {gather*} \frac {12 \log (\cos (c+d x))+6 \tan ^2(c+d x)-3 \tan ^4(c+d x)+2 \tan ^6(c+d x)}{12 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 49, normalized size = 0.86
method | result | size |
derivativedivides | \(\frac {\frac {\left (\tan ^{6}\left (d x +c \right )\right )}{6}-\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\frac {\ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}}{d}\) | \(49\) |
default | \(\frac {\frac {\left (\tan ^{6}\left (d x +c \right )\right )}{6}-\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\frac {\ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}}{d}\) | \(49\) |
norman | \(\frac {\tan ^{2}\left (d x +c \right )}{2 d}-\frac {\tan ^{4}\left (d x +c \right )}{4 d}+\frac {\tan ^{6}\left (d x +c \right )}{6 d}-\frac {\ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d}\) | \(57\) |
risch | \(-i x -\frac {2 i c}{d}+\frac {6 \,{\mathrm e}^{10 i \left (d x +c \right )}+12 \,{\mathrm e}^{8 i \left (d x +c \right )}+\frac {68 \,{\mathrm e}^{6 i \left (d x +c \right )}}{3}+12 \,{\mathrm e}^{4 i \left (d x +c \right )}+6 \,{\mathrm e}^{2 i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{6}}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(103\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 74, normalized size = 1.30 \begin {gather*} -\frac {\frac {18 \, \sin \left (d x + c\right )^{4} - 27 \, \sin \left (d x + c\right )^{2} + 11}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 6 \, \log \left (\sin \left (d x + c\right )^{2} - 1\right )}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 51, normalized size = 0.89 \begin {gather*} \frac {2 \, \tan \left (d x + c\right )^{6} - 3 \, \tan \left (d x + c\right )^{4} + 6 \, \tan \left (d x + c\right )^{2} + 6 \, \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right )}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.16, size = 56, normalized size = 0.98 \begin {gather*} \begin {cases} - \frac {\log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {\tan ^{6}{\left (c + d x \right )}}{6 d} - \frac {\tan ^{4}{\left (c + d x \right )}}{4 d} + \frac {\tan ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \tan ^{7}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 810 vs.
\(2 (51) = 102\).
time = 3.25, size = 810, normalized size = 14.21 \begin {gather*} \frac {6 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \tan \left (d x\right )^{6} \tan \left (c\right )^{6} + 11 \, \tan \left (d x\right )^{6} \tan \left (c\right )^{6} - 36 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \tan \left (d x\right )^{5} \tan \left (c\right )^{5} + 6 \, \tan \left (d x\right )^{6} \tan \left (c\right )^{4} - 54 \, \tan \left (d x\right )^{5} \tan \left (c\right )^{5} + 6 \, \tan \left (d x\right )^{4} \tan \left (c\right )^{6} + 90 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \tan \left (d x\right )^{4} \tan \left (c\right )^{4} - 3 \, \tan \left (d x\right )^{6} \tan \left (c\right )^{2} - 36 \, \tan \left (d x\right )^{5} \tan \left (c\right )^{3} + 99 \, \tan \left (d x\right )^{4} \tan \left (c\right )^{4} - 36 \, \tan \left (d x\right )^{3} \tan \left (c\right )^{5} - 3 \, \tan \left (d x\right )^{2} \tan \left (c\right )^{6} - 120 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \tan \left (d x\right )^{3} \tan \left (c\right )^{3} + 2 \, \tan \left (d x\right )^{6} + 18 \, \tan \left (d x\right )^{5} \tan \left (c\right ) + 90 \, \tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 72 \, \tan \left (d x\right )^{3} \tan \left (c\right )^{3} + 90 \, \tan \left (d x\right )^{2} \tan \left (c\right )^{4} + 18 \, \tan \left (d x\right ) \tan \left (c\right )^{5} + 2 \, \tan \left (c\right )^{6} + 90 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \tan \left (d x\right )^{2} \tan \left (c\right )^{2} - 3 \, \tan \left (d x\right )^{4} - 36 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + 99 \, \tan \left (d x\right )^{2} \tan \left (c\right )^{2} - 36 \, \tan \left (d x\right ) \tan \left (c\right )^{3} - 3 \, \tan \left (c\right )^{4} - 36 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \tan \left (d x\right ) \tan \left (c\right ) + 6 \, \tan \left (d x\right )^{2} - 54 \, \tan \left (d x\right ) \tan \left (c\right ) + 6 \, \tan \left (c\right )^{2} + 6 \, \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) + 11}{12 \, {\left (d \tan \left (d x\right )^{6} \tan \left (c\right )^{6} - 6 \, d \tan \left (d x\right )^{5} \tan \left (c\right )^{5} + 15 \, d \tan \left (d x\right )^{4} \tan \left (c\right )^{4} - 20 \, d \tan \left (d x\right )^{3} \tan \left (c\right )^{3} + 15 \, d \tan \left (d x\right )^{2} \tan \left (c\right )^{2} - 6 \, d \tan \left (d x\right ) \tan \left (c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.49, size = 49, normalized size = 0.86 \begin {gather*} -\frac {\frac {\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}{2}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2}{2}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^4}{4}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^6}{6}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________